home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
c't freeware shareware 1999 February
/
CT_SW9902.ISO
/
mac
/
software
/
wissen
/
daten
/
gnuplot.hqx
/
gnuplot.2.0b4
/
Interapplication
/
Python console
/
gnucon.py
< prev
next >
Wrap
Text File
|
1997-06-27
|
690b
|
31 lines
#
# A simple console for gnuplot
#
# Author: Anthony M. Ingraldi, a.m.ingraldi@larc.nasa.gov
#
import gnuplot_Suites, Required_Suite, aetools
import sys
import regsub
# The Creator signature of gnuplot:
SIGNATURE="GPSE"
class GNUPLOT(aetools.TalkTo, Required_Suite.Required_Suite, \
gnuplot_Suites.gnuplot_Suite, gnuplot_Suites.odds_and_ends, gnuplot_Suites.Standard_Suite, \
gnuplot_Suites.Miscellaneous_Events):
pass
g = GNUPLOT(SIGNATURE, 1)
prompt = g.gnuexec('\r')
while 1:
cmd = raw_input(regsub.gsub('\015','\012',prompt))
if cmd == 'quit' or cmd == 'exit':
g.quit()
sys.exit()
try:
prompt = g.gnuexec(cmd)
except:
sys.exit()